Skip to content

Conversation

@dom96
Copy link
Contributor

@dom96 dom96 commented Aug 13, 2025

Python Workers has a new compat flag which becomes default on 2025-08-14. At which point the global handlers won't be supported in Python anymore. This PR updates all templates to use the new way of defining the handlers.


@dom96 dom96 requested a review from a team August 13, 2025 16:01
@dom96 dom96 requested a review from a team as a code owner August 13, 2025 16:01
@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: b22f67a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
create-cloudflare Minor
miniflare Minor
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 13, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10357

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10357

miniflare

npm i https://pkg.pr.new/miniflare@10357

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10357

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10357

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10357

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10357

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10357

wrangler

npm i https://pkg.pr.new/wrangler@10357

commit: b22f67a

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Aug 13, 2025
@CarmenPopoviciu
Copy link
Contributor

tests seem to be legitimately failing

@dom96 dom96 force-pushed the dominik/python-no-global-handlers branch from 65030ab to d132de2 Compare August 14, 2025 11:03
@dom96
Copy link
Contributor Author

dom96 commented Aug 14, 2025

Okay, I think I fixed the failing test. Any ideas why the E2E is failing?

@CarmenPopoviciu
Copy link
Contributor

Okay, I think I fixed the failing test. Any ideas why the E2E is failing?

they are failing with Uncaught TypeError: Cannot define multiple default entrypoints. See https://github.com/cloudflare/workers-sdk/actions/runs/16963372772/job/48081306269?pr=10357#step:7:523

@dom96
Copy link
Contributor Author

dom96 commented Aug 15, 2025

Oh interesting, thanks for linking. I think that's because the compat date is 2025-08-13. How do these tests determine the compat date to use?

@CarmenPopoviciu
Copy link
Contributor

2025-08-13.

It's coming from here:

async function getCompatibilityDate<T extends Record<string, unknown>>(
config: T,
) {
const validCompatDateRe = /^\d{4}-\d{2}-\d{2}$/m;
if (
typeof config["compatibility_date"] === "string" &&
config["compatibility_date"].match(validCompatDateRe)
) {
// If the compat date is already a valid one, leave it since it may be there for a specific compat reason
return config["compatibility_date"];
}
return await getWorkerdCompatibilityDate();
}
, and based on the logic there you could set a specific compat date in your template if needed. Or perhaps use a compat flag instead, in case that works better? That would be a stronger signal to users that the template relies on a specific compat flag vs compat date.

@CarmenPopoviciu CarmenPopoviciu force-pushed the dominik/python-no-global-handlers branch from d132de2 to ffd6dad Compare August 18, 2025 14:40
…ory with 2 updates

Bumps the workerd-and-workers-types group with 2 updates in the / directory: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).

Updates `@cloudflare/workers-types` from 4.20240614.0 to 4.20250816.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20250813.0 to 1.20250816.0
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/Dockerfile.release)
- [Commits](cloudflare/[email protected])

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 4.20250816.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20250816.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
@CarmenPopoviciu CarmenPopoviciu force-pushed the dominik/python-no-global-handlers branch from ffd6dad to 693768b Compare August 18, 2025 14:47
@CarmenPopoviciu CarmenPopoviciu merged commit 565c3a3 into main Aug 18, 2025
36 of 37 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the dominik/python-no-global-handlers branch August 18, 2025 16:18
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants